import Vue from 'vue'
import Router from 'vue-router'
import main from '@/views/main'
import addClasify from '@/views/clasify/add-clasify.vue'
import changeClasify from '@/views/clasify/change-clasify.vue'
import attrTemplate from '@/views/attr/attr-template.vue'
Vue.use(Router)

export default new Router({
    routes: [
       
        {
            path:'',
            name:'',
            meta: {
                requireAuth: true // 添加该字段，表示进入这个路由是需要登录的
            },
            leaf: true, //只有一个节点
            component: main,
            children: [{
                path: 'add-claify',
                name: '添加分类',
                component: addClasify
            },
            {
                path: 'change-claify',
                name: '修改分类',
                component:changeClasify
            },
            {
                path: 'attr-template',
                name: '属性模板',
                component:()=>
                    import ('@/views/attr/attr-template.vue')
                
            },
            {
                path: 'entry-template',
                name: '词条管理',
                component:()=>
                    import ('@/views/entry/entry.vue')
                
            },
            {
                path: 'add-entry-template',
                name: '新增词条',
                component:()=>
                    import ('@/views/entry/add-entry.vue')
                
            },
        ]
        }
        

    ]
})